[Top] [Prev] [Next] [Bottom] [Contents]

SaAddToFree

Adds memory allocated by the standard C library to the Sapphire free list. Sapphire will "garbage collect" the memory after the current request is handled. Do not add memory twice. Do not add memory allocated from SaMalloc, since that is already is on the free list.

Synopsis

#include "SaRnHtml.h"
int SaAddToFree SUTPROTO((void* el));

Arguments

el
pointer to memory chunk to add to free list.

Return Values

The value, 0.

Description

Adds memory allocated by the standard C library to the Sapphire free list. Sapphire will "garbage collect" the memory after the current request is handled. Do not add memory twice. Do not add memory allocated from SaMalloc, since that is already is on the free list. Sapphire application servers will clean up the memory for this chunk at the end of a request -- so don't free it or hold onto after a request.

Example

char* str;
str = (char*) malloc(1024);
SaAddToFree(str);

See Also



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.